package com.swlz.service;

import com.swlz.entity.Recharge;
import com.swlz.exception.CodeException;
import com.swlz.vo.PageVO;

/**
 * <pre>
 * 业务逻辑接口
 * 充值记录
 * ClassName : com.swlz.service.RechargeService
 * Author :swlz
 * E-Mail : 2233875735@qq.com
 * Date : 2020-06-25 06:13:50
 * Version : 1.0
 * Copyright 2020 swlz.top Inc. All rights reserved. 
 * Warning: this content is only for internal circulation of the company. It is forbidden to divulge it or use it for other commercial purposes
 * </pre>
 **/
public interface RechargeService {


	/**
	 * 添加一个新的充值记录
	 * @param recharge
	 * @return
	 * @throws CodeException 500:添加充值记录错误
	 */
	int add(Recharge recharge)throws CodeException;
	
	/**
	 * 根据充值编号修改充值记录
	 * @param recharge
	 * @return
	 * @throws CodeException 501:修改充值记录错误
	 */
	int update(Recharge recharge)throws CodeException;
	
	
	/**
	 * 根据充值编号删除充值记录
	 * @param rechargeId - 充值编号
	 * @return
	 * @throws CodeException 502:删除充值记录错误
	 */
	int delete(Long rechargeId)throws CodeException;
	
	/**
	 * 根据充值编号获取充值记录对象
	 * @param rechargeId - 充值编号
	 * @return
	 * @throws CodeException 503:获取充值记录失败
	 */
	Recharge get(Long rechargeId)throws CodeException;
	
	/**
	 * 根据模型查找匹配的数据，并进行分页
	 * @param recharge - 匹配数据模型
	 * @param current - 当前页面
	 * @param rowMax - 每页最大值
	 * @return - 分页结果
	 * @throws CodeException 504:获取充值记录分页数据失败
	 */
	PageVO<Recharge> page(Recharge recharge,Integer current,Integer rowMax)throws CodeException;

 
}
